﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Kkc.Model.Page>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Ny side
</asp:Content>

<asp:Content ID="HeadContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script type="text/javascript">
        $(function() {
            $(".rte-zone").rte({
                css_url: "<%= Url.Content("~/Content/rte.css") %>",
                media_url: "<%= Url.Content("~/Content/Images/") %>"
            });
        });        
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Opprett ny side</h2>

    <%= Html.ValidationSummary("Lagringen kunne ikke fullføres på grunn av feil inntastede verdier. Venligst rett feilene og prøv igjen.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Felt</legend>
            <p>
                <label for="Title">Tittel:</label>
                <%= Html.TextBox("Title", string.Empty, new { @class = "full" })%>
                <%= Html.ValidationMessage("Title", "*") %>
            </p>
            <p>
                <label for="Body">Innhold:</label>
                <%= Html.TextArea("Contents", new { @class = "rte-zone full" }) %>
                <%= Html.ValidationMessage("Contents", "*") %>
            </p>
            <p>
                <input class="button button-big" type="submit" value="Lagre" />
                <input type="hidden" name="name" id="name" value="<%= Model.Name %>" />
            </p>
        </fieldset>

    <% } %>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LeftSideContent" runat="server">
    <ul>
        <li class="first"><%=Html.ActionLink("Tilbake til siden", "View", new { name = Model.Name })%></li>
    </ul>
</asp:Content>